#ifndef _I2CS_CTRL_H_
#define _I2CS_CTRL_H_

#include "gd32f3x0.h"

#define DIB542_I2CS_CH          I2C1
#define DIB542_I2CS_ADDR        0x8A
#define DIB542_MAX_COM          8
#define DIB542_REGS_Max         16

void I2CS_Config(void);
void I2CS_Enable(void);
void I2CS_Disable(void);
void I2CS_SendMsg(void);
void I2CS_EventIRQ_Handler(void);
void I2CS_ErrorIRQ_Handler(void);
void I2CS_SaveCANCommand(uint32_t stdID, uint8_t DLC, uint8_t* pCanData, int32_t len);
void I2CS_ProcCANCommand(void);
void I2CS_SendCANMsg(void);
void I2CS_DumpRX(void);

#endif

